using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class so_gal_passengerMap : EntityTypeConfiguration<so_gal_passenger>
    {
        public so_gal_passengerMap()
        {
            // Primary Key
            this.HasKey(t => new { t.ID, t.voided });

            // Properties
            this.Property(t => t.ID)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);

            this.Property(t => t.SectionString)
                .HasMaxLength(500);

            this.Property(t => t.Section_Label)
                .IsFixedLength()
                .HasMaxLength(3);

            this.Property(t => t.PASSENGER_NAME)
                .IsFixedLength()
                .HasMaxLength(33);

            this.Property(t => t.TRANSACTION_NUMBER)
                .IsFixedLength()
                .HasMaxLength(11);

            this.Property(t => t.YEAR_INDICATOR)
                .IsFixedLength()
                .HasMaxLength(1);

            this.Property(t => t.TICKET_NUMBER)
                .IsFixedLength()
                .HasMaxLength(10);

            this.Property(t => t.NUMBER_OF_TICKET_BOOKS)
                .IsFixedLength()
                .HasMaxLength(2);

            this.Property(t => t.INVOICE_NUMBER)
                .IsFixedLength()
                .HasMaxLength(9);

            this.Property(t => t.PASSENGER_IDENTIFICATION)
                .IsFixedLength()
                .HasMaxLength(6);

            this.Property(t => t.ASSOCIATED_FARE_ITEM_NUMBER_FOR_PASSENGER)
                .IsFixedLength()
                .HasMaxLength(2);

            this.Property(t => t.ASSOCIATED_EXCHANGE_ITEM_NUMBER_FOR_PASSENGER)
                .IsFixedLength()
                .HasMaxLength(2);

            this.Property(t => t.NAME_FIELD_REMARKS_IDENTIFIER)
                .IsFixedLength()
                .HasMaxLength(3);

            this.Property(t => t.NAME_FIELD_REMARKS)
                .IsFixedLength()
                .HasMaxLength(33);

            this.Property(t => t.PASSENGER_TITLE_IDENTIFIER)
                .IsFixedLength()
                .HasMaxLength(2);

            this.Property(t => t.PASSENGER_TITLE)
                .IsFixedLength()
                .HasMaxLength(13);

            this.Property(t => t.PASSENGER_AGE_IDENTIFIER)
                .IsFixedLength()
                .HasMaxLength(2);

            this.Property(t => t.PASSENGER_AGE)
                .IsFixedLength()
                .HasMaxLength(3);

            this.Property(t => t.PASSENGER_GENDER_IDENTIFIER)
                .IsFixedLength()
                .HasMaxLength(2);

            this.Property(t => t.PASSENGER_GENDER)
                .IsFixedLength()
                .HasMaxLength(1);

            this.Property(t => t.PASSENGER_SMOKING_PREFERENCE_IDENTIFIER)
                .IsFixedLength()
                .HasMaxLength(2);

            this.Property(t => t.PASSENGER_SMOKING_PREFERENCE)
                .IsFixedLength()
                .HasMaxLength(1);

            this.Property(t => t.PASSENGER_COUNTRY_OF_CITIZENSHIP_IDENTIFIER)
                .IsFixedLength()
                .HasMaxLength(2);

            this.Property(t => t.PASSENGER_COUNTRY_CODE_OF_CITIZENSHIP)
                .IsFixedLength()
                .HasMaxLength(2);

            this.Property(t => t.PASSENGER_PASSPORT_NUMBER_IDENTIFIER)
                .IsFixedLength()
                .HasMaxLength(2);

            this.Property(t => t.PASSENGER_PASSPORT_NUMBER)
                .IsFixedLength()
                .HasMaxLength(33);

            this.Property(t => t.PASSENGER_PASSPORT_EXPIRATION_DATE_IDENTIFIER)
                .IsFixedLength()
                .HasMaxLength(2);

            this.Property(t => t.PASSENGER_PASSPORT_EXPIRATION_DATE)
                .IsFixedLength()
                .HasMaxLength(7);

            this.Property(t => t.STOCK_CONTROL_NUMBER_IDENTIFIER)
                .IsFixedLength()
                .HasMaxLength(3);

            this.Property(t => t.NUMBER_OF_DOCUMENTS_ISSUED__ASSOCIATED_TO_THIS_TICKET)
                .IsFixedLength()
                .HasMaxLength(2);

            this.Property(t => t.STOCK_CONTROL_NUMBER)
                .IsFixedLength()
                .HasMaxLength(11);

            this.Property(t => t.NUMBER_OF_DOCUMENTS_ISSUED__ASSOCIATED_TO_THIS_TICKET_)
                .IsFixedLength()
                .HasMaxLength(4);

            this.Property(t => t.Routing)
                .HasMaxLength(50);

            this.Property(t => t.Refund_Reference)
                .HasMaxLength(10);

            this.Property(t => t.vglbatch)
                .HasMaxLength(10);

            // Table & Column Mappings
            this.ToTable("so_gal_passenger");
            this.Property(t => t.ID).HasColumnName("ID");
            this.Property(t => t.reference).HasColumnName("reference");
            this.Property(t => t.SectionString).HasColumnName("SectionString");
            this.Property(t => t.MIR).HasColumnName("MIR");
            this.Property(t => t.Section_Label).HasColumnName("Section Label");
            this.Property(t => t.PASSENGER_NAME).HasColumnName("PASSENGER NAME");
            this.Property(t => t.TRANSACTION_NUMBER).HasColumnName("TRANSACTION NUMBER");
            this.Property(t => t.YEAR_INDICATOR).HasColumnName("YEAR INDICATOR");
            this.Property(t => t.TICKET_NUMBER).HasColumnName("TICKET NUMBER");
            this.Property(t => t.NUMBER_OF_TICKET_BOOKS).HasColumnName("NUMBER OF TICKET BOOKS");
            this.Property(t => t.INVOICE_NUMBER).HasColumnName("INVOICE NUMBER");
            this.Property(t => t.PASSENGER_IDENTIFICATION).HasColumnName("PASSENGER IDENTIFICATION");
            this.Property(t => t.ASSOCIATED_FARE_ITEM_NUMBER_FOR_PASSENGER).HasColumnName("ASSOCIATED FARE ITEM NUMBER FOR PASSENGER");
            this.Property(t => t.ASSOCIATED_EXCHANGE_ITEM_NUMBER_FOR_PASSENGER).HasColumnName("ASSOCIATED EXCHANGE ITEM NUMBER FOR PASSENGER");
            this.Property(t => t.NAME_FIELD_REMARKS_IDENTIFIER).HasColumnName("NAME FIELD REMARKS IDENTIFIER");
            this.Property(t => t.NAME_FIELD_REMARKS).HasColumnName("NAME FIELD REMARKS");
            this.Property(t => t.PASSENGER_TITLE_IDENTIFIER).HasColumnName("PASSENGER TITLE IDENTIFIER");
            this.Property(t => t.PASSENGER_TITLE).HasColumnName("PASSENGER TITLE");
            this.Property(t => t.PASSENGER_AGE_IDENTIFIER).HasColumnName("PASSENGER AGE IDENTIFIER");
            this.Property(t => t.PASSENGER_AGE).HasColumnName("PASSENGER AGE");
            this.Property(t => t.PASSENGER_GENDER_IDENTIFIER).HasColumnName("PASSENGER GENDER IDENTIFIER");
            this.Property(t => t.PASSENGER_GENDER).HasColumnName("PASSENGER GENDER");
            this.Property(t => t.PASSENGER_SMOKING_PREFERENCE_IDENTIFIER).HasColumnName("PASSENGER SMOKING PREFERENCE IDENTIFIER");
            this.Property(t => t.PASSENGER_SMOKING_PREFERENCE).HasColumnName("PASSENGER SMOKING PREFERENCE");
            this.Property(t => t.PASSENGER_COUNTRY_OF_CITIZENSHIP_IDENTIFIER).HasColumnName("PASSENGER COUNTRY OF CITIZENSHIP IDENTIFIER");
            this.Property(t => t.PASSENGER_COUNTRY_CODE_OF_CITIZENSHIP).HasColumnName("PASSENGER COUNTRY CODE OF CITIZENSHIP");
            this.Property(t => t.PASSENGER_PASSPORT_NUMBER_IDENTIFIER).HasColumnName("PASSENGER PASSPORT NUMBER IDENTIFIER");
            this.Property(t => t.PASSENGER_PASSPORT_NUMBER).HasColumnName("PASSENGER PASSPORT NUMBER");
            this.Property(t => t.PASSENGER_PASSPORT_EXPIRATION_DATE_IDENTIFIER).HasColumnName("PASSENGER PASSPORT EXPIRATION DATE IDENTIFIER");
            this.Property(t => t.PASSENGER_PASSPORT_EXPIRATION_DATE).HasColumnName("PASSENGER PASSPORT EXPIRATION DATE");
            this.Property(t => t.STOCK_CONTROL_NUMBER_IDENTIFIER).HasColumnName("STOCK CONTROL NUMBER IDENTIFIER");
            this.Property(t => t.NUMBER_OF_DOCUMENTS_ISSUED__ASSOCIATED_TO_THIS_TICKET).HasColumnName("NUMBER OF DOCUMENTS ISSUED, ASSOCIATED TO THIS TICKET");
            this.Property(t => t.STOCK_CONTROL_NUMBER).HasColumnName("STOCK CONTROL NUMBER");
            this.Property(t => t.NUMBER_OF_DOCUMENTS_ISSUED__ASSOCIATED_TO_THIS_TICKET_).HasColumnName("NUMBER OF DOCUMENTS ISSUED, ASSOCIATED TO THIS TICKET.");
            this.Property(t => t.Psid).HasColumnName("Psid");
            this.Property(t => t.Routing).HasColumnName("Routing");
            this.Property(t => t.Tax_Amount).HasColumnName("Tax Amount");
            this.Property(t => t.Purchase_Amount).HasColumnName("Purchase Amount");
            this.Property(t => t.Sale_Amount).HasColumnName("Sale Amount");
            this.Property(t => t.CCSale_Amount).HasColumnName("CCSale Amount");
            this.Property(t => t.Posted_Sale).HasColumnName("Posted Sale");
            this.Property(t => t.Posted_Purchase).HasColumnName("Posted Purchase");
            this.Property(t => t.Refund_Sale_Amount).HasColumnName("Refund Sale Amount");
            this.Property(t => t.Refund_Purchase_Amount).HasColumnName("Refund Purchase Amount");
            this.Property(t => t.Refund_Reference).HasColumnName("Refund Reference");
            this.Property(t => t.Coupon1).HasColumnName("Coupon1");
            this.Property(t => t.Coupon2).HasColumnName("Coupon2");
            this.Property(t => t.Coupon3).HasColumnName("Coupon3");
            this.Property(t => t.Coupon4).HasColumnName("Coupon4");
            this.Property(t => t.vglbatch).HasColumnName("vglbatch");
            this.Property(t => t.Pending_Refund).HasColumnName("Pending Refund");
            this.Property(t => t.Refund).HasColumnName("Refund");
            this.Property(t => t.Refund_Date).HasColumnName("Refund Date");
            this.Property(t => t.Cash_collection).HasColumnName("Cash collection");
            this.Property(t => t.Discount_percent).HasColumnName("Discount_percent");
            this.Property(t => t.Discount_value).HasColumnName("Discount_value");
            this.Property(t => t.Returnpsid).HasColumnName("Returnpsid");
            this.Property(t => t.Currency).HasColumnName("Currency");
            this.Property(t => t.mirtype).HasColumnName("mirtype");
            this.Property(t => t.voided).HasColumnName("voided");
        }
    }
}
